const Layout = () =>
    import ('@/layout/index.vue')

const List = () =>
    import ('@/views/test/index.vue')
const Add = () =>
    import ('@/views/test/Add.vue')
const Edit = () =>
    import ('@/views/test/Edit.vue')
const Auth = () =>
    import ('@/views/test/Auth.vue')
const NoAuth = () =>
    import ('@/views/test/NoAuth.vue')
const Nest = () =>
    import ('@/views/test/Nest.vue')


const Iscache = () =>
    import ('@/views/test/Cache.vue')
const Nocache = () =>
    import ('@/views/test/Nocache.vue')

export default [{
        path: '/devices',
        //     component: Layout,
        //     name: 'Devices',
        //     meta: {
        //         title: '分项设备数据',
        //     },
        //     icon: 'icon-device',
        //     children: [{
        //         path: '',
        //         name: 'devicesList',
        //         component: () =>
        //             import ('@/views/devices/index.vue'),
        //         meta: {
        //             title: '设备列表',
        //         },
        //     }, ],
        // }, ]

        component: Layout,
        name: 'devices',
        meta: {
            title: 'menu.devices',
        },
        icon: 'Odometer',
        children: [{
                path: '',
                name: 'testList',
                component: List,
                meta: {
                    title: 'menu.testList',
                },
                // children: [{
                //         path: 'add',
                //         name: 'testAdd',
                //         component: Add,
                //         meta: {
                //             title: 'menu.testAdd',
                //         },
                //         hidden: true, // 不在菜单中显示
                //     },
                //     {
                //         path: 'edit/:id',
                //         name: 'testEdit',
                //         component: Edit,
                //         meta: {
                //             title: 'menu.testEdit',
                //         },
                //         hidden: true, // 不在菜单中显示
                //     },
                // ],
            },

            {
                path: '',
                name: 'devicesList',
                component: () =>
                    import ('@/views/devices/index.vue'),
                meta: {
                    title: '设备列表',
                },
            },
            {
                path: 'auth',
                name: 'testAuth',
                component: Auth,
                meta: {
                    title: 'menu.testAuth',
                },
            },
            {
                path: 'noauth',
                name: 'testNoAuth',
                component: NoAuth,
                meta: {
                    title: 'menu.testNoAuth',
                },
                hidden: true,
            },
            {
                path: 'cache',
                name: 'test-cache',
                component: Iscache,
                meta: {
                    title: 'menu.test-cache',
                },
            },
            {
                path: 'nocache',
                name: 'test-no-cache',
                component: Nocache,
                meta: {
                    title: 'menu.test-no-cache',
                    noCache: true, // 不缓存页面
                },
            },
            {
                path: 'nest',
                name: 'nest',
                component: Nest,
                redirect: '/test/nest/page1',
                meta: {
                    title: 'menu.nest',
                },

            },

        ],
    },

]